<template>

</template>

<script>
  import wx from 'weixin-js-sdk'

  export default {
    mounted () {
      let userId = this.$route.query.userId
      this._splice(userId)
    },
    methods: {
      _splice (userId) {
        this.$messagebox.confirm('认证会员，您确定吗?').then(action => {
          if (action === 'confirm') {
            this.$http({
              url: this.$http.adornUrl(`/mp/user/check/splice/${userId}`),
              method: 'get',
              params: this.$http.adornParams()
            }).then(({data}) => {
              window.location.href = data
            })
          }
        }).catch(err => {
          if (err === 'cancel') {
            wx.closeWindow()
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
